/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     varButton.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef VARBUTTON_H_
#define VARBUTTON_H_

#include "type.h"
#include "module_select.h"

/*variable adjustment*/
typedef struct
{
	uint16_t Code; // Function code
	uint8_t len;   // lenght
	uint16_t Xs;   // Upper left corner coordinate
	uint16_t Ys;
	uint16_t Xe; // Lower right corner coordinate
	uint16_t Ye;
	uint16_t p_add;		 // variable pointer
	uint8_t p_tpye;		 // variable type
	uint8_t Adj_mode;	 // icon id
	uint8_t Return_Mode; // Threshold return
	uint16_t Adj_step;	 // Adjusting step length
	int16_t V_min;		 // lower limit
	int16_t V_max;		 // upper limit
	uint16_t V_min1;	 // lower limit
	uint16_t V_max1;	 // upper limit
	uint8_t key_mode;	 // Press mode, 0:continuous adjustment, 1:adjustment only once
	uint16_t id;
	uint16_t press_id;
} Adj_Info;
extern Adj_Info gAdj_Info[];
extern uint8_t Adj_count;
extern uint8_t Adj_flag;
extern uint8_t Adj_num;
extern uint8_t Adj_time;
extern uint8_t Adj_loop;
/***********/

extern void Adj_touch(void);

#endif /* VARBUTTON_H_ */
